package cn.aws360.boot.base.api.pojo.properties;

import cn.aws360.boot.base.api.constant.BaseConstant;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author junnan
 */
@Data
@ConfigurationProperties(prefix = BaseConstant.APP + ".cors")
public class CorsProperties {

    @Value("${maxAge:18000}")
    private Long maxAge;

    @Value("${allowedMethods:*}")
    private String allowedMethods;

    @Value("${allowedHeaders:*}")
    private String allowedHeaders;

    @Value("${allowCredentials:true}")
    private boolean allowCredentials;

    @Value("${allowedOriginPattern:*}")
    private String allowedOriginPattern;

}
